package bishi.day29_5_27;
import java.util.*;
/**
 * @author 是阿秋啊
 * @date 2022/05/27 19:59
 **/
public class you_jia_bi {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()) {
            int n = sc.nextInt();
            if(n == 0) {
                return;
            }
            if(n == 1) {
                System.out.println("0");
                continue;
            }
            if(n <= 3) {
                System.out.println("1");
                continue;
            }
            int count = 0;
            while(n > 1) {
                n = (int)Math.ceil(n / 3.0);
                count++;
            }
            System.out.println(count);
        }
    }
}